import time

def read2list(filename):
    with open(filename, 'r') as file:
        data = file.readlines()
    return data

def bubble_sort(nums):
    swapped = True
    while swapped:
        swapped = False
        for i in range(len(nums) - 1):
            if nums[i] > nums[i + 1]:
                nums[i], nums[i + 1] = nums[i + 1], nums[i]
                swapped = True

nums = [5, 2, 8, 1, 9]
t_start = time.process_time()
bubble_sort(nums)
t_finish = time.process_time()
print("Time:", (t_finish - t_start) * 1000.0)

